<template>
  <div class="search_z">
    <el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
      <el-select v-model="select" slot="prepend" placeholder="请选择">
        <el-option label="书名" value="1"></el-option>
        <el-option label="书库" value="2"></el-option>
        <el-option label="作者" value="3"></el-option>
      </el-select>
      <el-button slot="append" icon="el-icon-search" @click="hello()"></el-button>
    </el-input>
  </div>
</template>
<script>
    export default {
        data() {
            return {
                input3: '',
                select: ''
            }
        },
        methods: {
            handleClick(tab, event) {
                console.log(tab, event);
            },
            hello() {
                if (this.input3 == '' || this.input3 == undefined || this.input3 == null) {
                    this.$message.error('请输入文字')
                } else {
                    // this.$router.push('/search?content=' + this.input3)
                    // this.$router.push(`/playlist?id=${id}`)
                    console.log(this.input3, this.select);
                }
            }
        },
    }
</script>
<style>
    .search_z {
        width: 852px;
        background: #fff;
        border-radius: 5px;
        height: 50px;
        line-height: 50px;
        margin: 0px auto;
    }
</style>
